﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MySoftLab.DapFlashCore.Targets
{
    public class MemoryRangeBase
    {
        public uint Start { get; set; }

        public uint End { get; set; }

        public uint Length { get; set; }

        public MemoryRangeBase(uint start, uint length, uint end = 0)
        {
            Start = start;

            Length = length;

            if (end == 0)
            {
                End = start + length - 1;
            }
            else
            {
                Length = end - start + 1;
            }
        }
    }
}
